{% extends "grid/base.html" %}

{% load i18n page_metadata_tags %}

{% block metadata %}
    {% translate "Timesheet for " as trans_title %}
    {% page_metadata page_title=trans_title|add:grid.title %}
{% endblock metadata %}

{% block extra_head %}
    <link href="{{ STATIC_URL }}css/timesheet.css" media="all" rel="stylesheet" />
{% endblock extra_head %}

{% block body %}
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h2>{% translate "Grid Time Table" %}</h2>
                <div id="timesheet"></div>
            </div>
        </div>
    </div>

{% endblock body %}
{% if not forloop.last %},{% endif %}
{% block extra_body %}
    <script src="{{ STATIC_URL }}js/timesheet.js" type="text/javascript"></script>
    <script type="text/javascript">
        new Timesheet('timesheet', 2008, 2016, [
            {% for grid_package in grid_packages %}
                {% with package=grid_package.package %}
                    ['{{ package.created|date:"m/Y" }}', '{{ package.last_commit.commit_date|date:"m/Y" }}', '{{ package.slug }}', ''],
                {% endwith %}
            {% endfor %}
        ]);


    </script>
{% endblock extra_body %}
